# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contributor: Cody P Schafer <archlinux@codyps.com>
# Contributor: John Eivind Helset <jehelset@gmail.com>

pkgname=debugedit
pkgver=5.0
pkgrel=5
pkgdesc='Tool to mangle source locations in .debug files'
arch=('loong64' 'x86_64')
url='https://sourceware.org/debugedit/'
license=('LGPL2.1')
depends=('glibc' 'libelf')
source=("https://sourceware.org/ftp/debugedit/${pkgver}/debugedit-${pkgver}.tar.xz"{,.sig})
validpgpkeys=('EC3CFE88F6CA0788774F5C1D1AA44BE649DE760A')
sha512sums=('7e7f529eafe41b53f0b5bfc58282fdbfa0dfa93ed7908b70e81942d6d2b6f80fc9c6bff2ed9674fd98947e5750b615f4c8b222544989e2900c5f8ff5ae0efb92'
            'SKIP')

prepare() {
    cd "debugedit-${pkgver}"
    autoreconf -fiv
}

build() {
    cd "debugedit-${pkgver}"
    ./configure --prefix=/usr
    make
}

package() {
    cd "debugedit-${pkgver}"
    make DESTDIR="${pkgdir}" install
}
